/**
 * 
 */
package com.shy.base.shiro;

import org.apache.shiro.authc.UsernamePasswordToken;

/**
 * <p>Title:EasyTypeToken </p>
 * <p>Description: </p>
 * <p>Company:ipebg </p> 
 * @author H2013788
 * @date 2018/11/10
 */
public class EasyTypeToken extends UsernamePasswordToken {
    
    /**
     * 
     */
    private static final long serialVersionUID = -6109683527354040718L;
    
    private LoginType type;

    public EasyTypeToken() {
        super();
    }

    public EasyTypeToken(String username, String password, LoginType type, boolean rememberMe,
            String host) {
        super(username, password, rememberMe, host);
        this.type = type;
    }

    /** 免密登录 */
    public EasyTypeToken(String username) {
        super(username, "", false, null);
        this.type = LoginType.NOPASSWD;
    }

    /** 账号密码登录 */
    public EasyTypeToken(String username, String password) {
        super(username, password, false, null);
        this.type = LoginType.PASSWORD;
    }

    public LoginType getType() {
        return type;
    }

    public void setType(LoginType type) {
        this.type = type;
    }
}